﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using TBM.Core;

namespace TBM.Controllers
{
    /// <summary>
    /// JS 响应接口
    /// </summary>
    public class JsRspController : Controller
    {
        /// <summary>
        /// 错误页面
        /// </summary>
        /// <param name="errorCode">错误码</param>
        /// <returns></returns>
        [AllowAnonymous]
        public ActionResult Error(int errorCode)
        {
            TBM.Models.ExecuteResult result = new Models.ExecuteResult
            {
                Result = false
            };

            switch (errorCode)
            {
                case 10:
                    {
                        result.Code = Lang.SERVICE_ERR_RESPONSE.Code;
                        result.Message = Lang.SERVICE_ERR_RESPONSE.Message;
                        break;
                    }
            }

            return Json(result, JsonRequestBehavior.AllowGet);
        }

    }
}
